/*
#pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
*/

#include "..\headers\dependancies.h"
#include "..\headers\BC_Game.h"



int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrevInst,LPSTR lpCmdLine,int nShowCmd)
{
	BC_INIT_DEBUGGER

	BCGame * game = new BCGame(800,600,32,false);
	


	game->loadTexture("player_tank.tga");
	
	game->getPlayer1()->createFrameSet(1);
	game->getPlayer1()->addFrame(1, 0,0,16,16);
	game->getPlayer1()->addFrame(1, 16,0,32,16);
	game->getPlayer1()->setAnimationSpeed(0.6f);
	game->getPlayer1()->playAnimation(1);
	game->getPlayer1()->setMoveSpeed(1.3f);


	while (game->isGameRunning())
	{
		if (game->isLastPressed('W')) { game->getPlayer1()->moveUp(); game->getPlayer1()->playAnimation(1); }
		if (game->isLastPressed('S')) { game->getPlayer1()->moveDown();  game->getPlayer1()->playAnimation(1); }
		if (game->isLastPressed('A')) { game->getPlayer1()->moveLeft();  game->getPlayer1()->playAnimation(1); }
		if (game->isLastPressed('D')) { game->getPlayer1()->moveRight();  game->getPlayer1()->playAnimation(1); }

	
		game->drawAll();

		game->getPlayer1()->stopAnimation();


		
		if (game->isKeyHit(VK_ESCAPE)) break;

	}

	delete game;
	
	BC_DESTROY_DEBUGGER

return 0;

}



